package conf2.model;

import java.io.Serializable;

public class Move implements Serializable {

    private final EActor attacker,  defender;
    private final ETerritory from,  to;

    public Move(EActor attacker, EActor defender, ETerritory from, ETerritory to) {
        this.attacker = attacker;
        this.defender = defender;
        this.from = from;
        this.to = to;
    }

    @Override
    public String toString() {
        return String.format("%s (%s) -> %s (%s)", getAttacker(), getFrom(), getDefender(), getTo());
    }

    public EActor getAttacker() {
        return attacker;
    }

    public EActor getDefender() {
        return defender;
    }

    public ETerritory getFrom() {
        return from;
    }

    public ETerritory getTo() {
        return to;
    }
}
